package cn.zhuangcloud.newversion.common.kit;

import com.jfinal.kit.HashKit;


public final class PasswordKit {

    private static final int hashTimes = 2;

    public static String hash(String password, String salt) {
        String pwd = HashKit.sha256(password + salt);
        for (int i = 0; i < hashTimes; ++i) {
            pwd = HashKit.sha256(pwd + salt);
        }
        return pwd;
    }

}
